<template>
  <div class="modal-wrapper">
    <div class="modal-container">
      <div class="modal-close" @click="close">
          <img src="../../../images/giftClose.png" alt="">
      </div>
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'game-modal',
  methods: {
    close() {
      document.body.style.overflow = ''
      this.$emit('close')
    }
  },
  mounted() {
    document.body.style.overflow = 'hidden'
  }
}
</script>

<style lang="scss" scoped>
.modal-wrapper {
    position: fixed;
    overflow: scroll;
    background-color: rgba(37,34,42,.95);
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  .modal-container {
    width: 88%;
    margin: auto;
  }
  .modal-close {
    position: absolute;
    top: 0;
    right: 11%;
    width: 3.4rem;
    img {
      max-width: 100%;
    }
  }
}
 </style>
